Text = "This is some text that wraps around in an edit box. DDRV.DLL has functions to return the contents of a line in the edit box and the number of lines in the box."
Top = 345
Width = 2010
End
End
Begin Frame Frame2
BackColor = &H00C0C0C0&
Caption = "Window && Grapics"
Height = 2940
Left = 2685
TabIndex = 16
Top = 585
Width = 3180
Begin CheckBox chkDeleteTemp
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Delete the temp file"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Left = 420
TabIndex = 30
Top = 1860
Value = 1 'Checked
Width = 2200
End
Begin CommandButton btnFloat
BackColor = &H00000000&
Caption = "Float It"
Height = 435
Left = 1635
TabIndex = 28
Top = 2385
Width = 1365
End
Begin CommandButton btnHandle
BackColor = &H00000000&
Caption = "Viewer hWnd"
Height = 435
Left = 135
TabIndex = 27
Top = 2385
Width = 1365
End
Begin CheckBox chkHideDefault
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Hide Default Printer Button"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Left = 420
TabIndex = 26
Top = 1620
Width = 2200
End
Begin CheckBox chkAltHints
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Alternate Buttons"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Left = 420
TabIndex = 21
Top = 660
Width = 2200
End
Begin CheckBox chkControlBox
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Show Control Box"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Left = 420
TabIndex = 20
Top = 420
Width = 2200
End
Begin CheckBox chkViewFirst
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "View First"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Left = 420
TabIndex = 19
Top = 900
Value = 1 'Checked
Width = 2200
End
Begin CheckBox chkMagnify
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Show Magnify "
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Left = 420
TabIndex = 18
Top = 1140
Value = 1 'Checked
Width = 2200
End
Begin CheckBox chkPrintSelect
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Show Print Select"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Left = 420
TabIndex = 17
Top = 1380
Value = 1 'Checked
Width = 2200
End
End
Begin CommandButton btnTest
BackColor = &H00000000&
Caption = "&Test"
Height = 495
Left = 6090
TabIndex = 15
Top = 3660
Width = 1905
End
Begin Frame Frame1
BackColor = &H00C0C0C0&
Caption = "Window State"
Height = 1755
Left = 195
TabIndex = 11
Top = 615
Width = 2340
Begin OptionButton optMinMax
BackColor = &H00C0C0C0&
Caption = "Normal"
Height = 195
Index = 0
Left = 420
TabIndex = 14
Top = 540
Value = -1 'True
Width = 1350
End
Begin OptionButton optMinMax
BackColor = &H00C0C0C0&
Caption = "Minimized"
Height = 195
Index = 1
Left = 420
TabIndex = 13
Top = 915
Width = 1410
End
Begin OptionButton optMinMax
BackColor = &H00C0C0C0&
Caption = "Maximized"
Height = 195
Index = 2
Left = 420
TabIndex = 12
Top = 1275
Width = 1380
End
End
Begin CommandButton btnDone
BackColor = &H00000000&
Caption = "&Done"
Height = 495
Left = 6075
TabIndex = 10
Top = 4350
Width = 1905
End
Begin Frame Frame3
BackColor = &H00C0C0C0&
Caption = "Orientation"
Height = 1260
Left = 2685
TabIndex = 7
Top = 3585
Width = 3195
Begin OptionButton optOrentation
BackColor = &H00C0C0C0&
Caption = "Portrait"
Height = 240
Index = 0
Left = 540
TabIndex = 9
Top = 420
Value = -1 'True
Width = 1440
End
Begin OptionButton optOrentation
BackColor = &H00C0C0C0&
Caption = "Landscape"
Height = 240
Index = 1
Left = 540
TabIndex = 8
Top = 780
Width = 1425
End
End
Begin Frame Frame4
BackColor = &H00C0C0C0&
Caption = "Initial Zoom State"
Height = 2925
Left = 6015
TabIndex = 2
Top = 570
Width = 1950
Begin CommandButton btnKill
BackColor = &H00000000&
Caption = "Kill Viewer"
Height = 435
Left = 300
TabIndex = 29
Top = 2310
Width = 1365
End
Begin OptionButton chkZoom
BackColor = &H00C0C0C0&
Caption = "100%"
Height = 270
Index = 0
Left = 390
TabIndex = 6
Top = 450
Width = 1380
End
Begin OptionButton chkZoom
BackColor = &H00C0C0C0&
Caption = "75%"
Height = 270
Index = 1
Left = 375
TabIndex = 5
Top = 915
Width = 1380
End
Begin OptionButton chkZoom
BackColor = &H00C0C0C0&
Caption = "50%"
Height = 270
Index = 2
Left = 390
TabIndex = 4
Top = 1380
Width = 1380
End
Begin OptionButton chkZoom
BackColor = &H00C0C0C0&
Caption = "Zoom to fit"
Height = 270
Index = 3
Left = 390
TabIndex = 3
Top = 1830
Value = -1 'True
Width = 1380
End
End
Begin Label Label1
Alignment = 2 'Center
BackColor = &H00000000&
Caption = "Copyright 1995, Don Dickinson - 72762,645 on CompuServe"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FFFFFF&
Height = 360
Index = 0
Left = -30
TabIndex = 0
Top = 120
Width = 8205
WordWrap = -1 'True
End
Begin Label Label1
Alignment = 2 'Center
BackColor = &H00000000&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FFFFFF&
Height = 360
Index = 1
Left = 0
TabIndex = 1
Top = 0
Width = 8190
WordWrap = -1 'True
End
Option Explicit
Sub btnDone_Click ()
End
End Sub
Sub btnFloat_Click ()
Dim hWnd%
' -- Get the viewer handle
hWnd% = rvGetHandle()
' -- Check to see if the viewer exists
If rvViewerActive(hWnd%) <> 0 Then
MsgBox "There is no viewer"
Else
' If it exists, float the window
Call rvFloatViewer(hWnd%, 1)
End If
End Sub
Sub btnHandle_Click ()
Dim hWnd%
' -- Get the handle for the viewer
hWnd% = rvGetHandle()
' -- Check to see if the handle is valid
If rvViewerActive(hWnd%) <> 0 Then
MsgBox "There is no viewer"
Else
MsgBox "The Viewer handle is" & Str$(hWnd%)
End If
' -- Check for the close handle
hWnd% = rvGetCloseHandle()
If hWnd% > 0 Then
MsgBox "The close handle is:" & Str$(hWnd%)
Else
MsgBox "Couldn't get the close handle"
End If
End Sub
Sub btnKill_Click ()
Dim hWndClose%
hWndClose% = rvGetCloseHandle()
If hWndClose% > 0 Then Call rvKillViewer(hWndClose%)
DoEvents
End Sub
Sub btnNoLines_Click ()
Dim a&, Which&
Dim Buffer As String * 1000
' -- Get the number of lines in the edit box
Which& = 0
' If we pass Which& = 0 then after the call
' Which& will contain the number of lines
' in the edit box. The Buffer parameter is
' unused in this call.
rvGetEditBoxLine txtEditBox.hWnd, Which&, Buffer
MsgBox "The edit box contains" & Str$(Which&) & " Lines."
' -- Draw a graphic a few times, stretch it different ways
GraphicFile$ = App.Path & "\test.bmp"
rvGraphic GraphicFile$, .5, .5, 1, 1
rvGraphic GraphicFile$, 1, 2, 4, 5
rvGraphic GraphicFile$, 7, 7, 8, 8
rvGraphic GraphicFile$, 1, 7, 4, 8
rvGraphic GraphicFile$, 6, 1, 7, 5
rvRect 6, 1, 7, 5, 2, RV_GREYBACK
rvFontSize 16
rvParagraph 5, 6, 7, 9, "This is a whole big line of word-wrapped text. It is wrapped using the rvParagraph command."
' -- Get the name of the temp file
' this is not used right now, but sometimes
' it is nice to know. You don't need to call
' this unless you want to know the name of the
' page description file.
e% = rvWhatIsTempFile(Tempfile)
MsgBox "A page description temp file has been created: " + Chr$(13) + Chr$(10) + Left$(Tempfile, e) + Chr$(13) + Chr$(10) + " The viewer will now start."